﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JGSY.DotNetty.Common
{
    public static class RegexPatterns
    {
        /// <summary>
        /// IPV4正则表达式(不带端口号)
        /// </summary>
        public const string Ipv4AddressPattern = @"((2[0-4]\d|25[0-5]|[01]?\d?\d)\.){3}(2[0-4]\d|25[0-5]|[01]?\d?\d)";
        //string pattern = @"^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$";

        public const string EMAIL_VALID = @"^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$";
        public const string PHONE_NUMBER_CHINA = @"^1[3-9]\d{9}$";
        public const string DATE_FORMAT_YMD = @"^\d{4}-\d{2}-\d{2}$";
    }
}
